package com.yanchangapp.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanchangapp.R;
import com.yanchangapp.model.bean.WareHouseBean;

import java.util.List;

/**
 * Created by apple on 2019-08-09.
 * description:仓库地址Adapter
 */
public class WareHouseAdapter extends BaseQuickAdapter<WareHouseBean, BaseViewHolder> {

    public WareHouseAdapter(int layoutResId, @Nullable List<WareHouseBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, WareHouseBean wareHouseBean) {
        TextView tvText =  baseViewHolder.getView(R.id.tvText);
        tvText.setText(wareHouseBean.getName());
        tvText.setSelected(wareHouseBean.isChecked());
    }
}
